<script type="text/javascript">
    function delreviews(reviewsid)
{
    var msg = confirm ("Are you sure you want to delete this recored?")
    if (msg) {
    //location.href = '/admin/user/deleteuser/userid/'+userid;
    $.ajax({
            type: "POST",
            data: ({reviews_id: reviewsid}),
            url: "<?php echo base_url(); ?>secu/reviews/delreviews/",
            success: function(data, textStatus, XMLHttpRequest){
              // alert(data);
              location.href = '<?php echo base_url(); ?>secu/reviews/';
            },
            complete: function complete(XMLHttpRequest, textStatus){
            
            }
    });
    } else {
       return false;
    } 
}

</script>
<?php

                   //if(count($reviews_arr) > 1)
                   //{
                   ?>
		<article class="module width_3_quarter">
		<header><h3 class="tabs_involved">Reviews Manager</h3>
		<!--<ul class="tabs">
   			<li><a href="#tab1">Posts</a></li>
    		<li><a href="#tab2">Comments</a></li>
		</ul>-->
		</header>

		<div class="tab_container">
			<div id="tab1" class="tab_content">
			<table class="tablesorter" cellspacing="0">
			<thead>
				<tr>
                                <th>#</th>
    				<th>Reviews Title</th>                                
                                <th>Status</th>
    				<th>Actions</th>
                                </tr>
			</thead>
			<tbody>
                            <?php
                                //print_r($reviews_lang);
                                foreach($reviews_arr as $reviews_entry) :
                            ?>
				<tr>
                                <td><?php echo $reviews_entry['reviews_id']; ?></td>

    				<td><?php echo $reviews_entry['title']; ?></td>                                
                                <td><?php echo ($reviews_entry["status"]==1)?"<img src=" . base_url() . "images/admin/enable.gif width='18' height='18'  />":"<img src=" . base_url() . "images/admin/disable.gif width='18' height='18' />";?></td>
    				<td><a href="<?php echo base_url(); ?>secu/reviews/managereviews/id/<?php echo $reviews_entry['reviews_id']; ?>"><img src="<?php echo base_url(); ?>images/admin/icn_edit.png" title="edit reviews" /></a>&nbsp;<a href="javascript: void(0);" onclick="delreviews(<?php echo $reviews_entry['reviews_id']; ?>)"><img src="<?php echo base_url(); ?>images/admin/icn_trash.png" title="delete reviews"></a></td>
				</tr>

                           <?php
                            endforeach;
                           ?>
			</tbody>
			</table>
                            <?php  echo $pagination;?>
			</div><!-- end of #tab1 -->

			<div id="tab2" class="tab_content">


			</div><!-- end of #tab2 -->

		</div><!-- end of .tab_container -->

		</article><!-- end of content manager article -->
                   <?php //} ?>



		<div class="clear"></div>